<ion-view view-title="我要经销">

    <div class="bar bar-subheader stable-bg padding-bottom-0">
        <div class="row text-center font-large-my padding-0">
            <div class="col" on-tap="activeTab(0)" ng-class="selectTab==0?'top-activated':''">
                已发布的经销
            </div>
            <div class="col" on-tap="activeTab(1)" ng-class="selectTab==1?'top-activated':''">
                发布经销
            </div>
        </div>
    </div>
    
    <ion-content scroll="true" class="scroll-padding">
        <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()" ng-if="selectTab==0"></ion-refresher>
        <ion-slide-box delegate-handle="tab-handle" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">
            <ion-slide>
            	<div class="font-large-my font-gray-my text-center padding" ng-if="list.beagenter.length==0||list.beagenter==null">
                    <i class="icon ion-sad-outline font-1rem-my"></i>
                   	 对不起，没有已发布的经销.....
                </div>
                <div class="list padding-0 list-borderless" ng-repeat="beagenter in list.beagenter">
					<div class="item padding">
						<p>品类：{{beagenter.cat_type_name}}</p>
						<p>经销区域：{{beagenter.region_name}}</p>
						<p>发布日期：{{beagenter.apply_time}}</p>
						<p>
							预投入金额：{{beagenter.capital|currency:'¥'}}
							<span class="right-zhang font-middle-my"><i class="icon ion-ios-telephone-outline positive font-large-my"></i>{{beagenter.phone}}</span>
						</p>
						<p>
							<span on-tap="findById_edit(beagenter.info_id)" ng-if="beagenter.status=='待审核'" class="margin-right-10-my"><i class="icon ion-compose positive"></i>&nbsp;编辑</span>
							<span on-tap="delete(beagenter.info_id,$index)"><i class="icon ion-ios-close-outline assertive"></i>&nbsp;删除</span>
							<span class="right-zhang assertive font-middle-my" ng-class="{'balanced':beagenter.status=='审核通过','energized':beagenter.status=='待审核'}">{{beagenter.status}}</span>
						</p>
					</div>
				</div>
            </ion-slide>

            <ion-slide>
                <div class="list padding-0">
                    <li class="item item-input">
                            品类：
                            <div class="input-value small" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
                            <div class="input-value small" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
                            <div class="input-value small" ng-click="doSelectCat3()">{{input.cat3.name}}</div>	
                    </li>
                    <li class="item item-input">
                            经销区域：
                            <div class="input-value small" ng-click="doSelectProvince()">{{input.province.name}}</div>
                            <div class="input-value small" ng-click="doSelectCity()">{{input.city.name}}</div>
                            <div class="input-value small" ng-click="doSelectDistrict()">{{input.district.name}}</div>
                    </li>
                    <li class="item item-input">
                        <span class="input-label">联系方式：</span>
                        <input type="text" placeholder="请输入联系方式" ng-model="input.phone" />
                    </li>
                    <li class="item item-input">
                        <span class="input-label">预投入资金：</span>
                        <input type="text" placeholder="请输入预投入资金" ng-model="input.capital" />
                    </li>
                    <li class="item item-input">
                        <span class="input-label">经销描述：</span>
                        <textarea rows="5" placeholder="请输入经销描述" style="padding-right:20px;" ng-model="input.reason"></textarea>
                    </li>
                </div>

                <div class="padding">
                    <button class="button button-block button-assertive" on-tap="add()">发布</button>
                </div>
            </ion-slide>

        </ion-slide-box>
        <ion-infinite-scroll ng-if="!isLoad&&selectTab==0" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
    </ion-content>
</ion-view>